<template>
  <!--应用列表-->
  <basic-container>
    <avue-crud
      :option="option"
      :table-loading="loading"
      :data="data"
      @current-change="currentChange"
      @size-change="sizeChange"
      ref="crud"
      :page.sync="page"
    >
      <template slot="status" slot-scope="{ row }">
        <span v-if="row.status === 0">正在工作</span>
        <span v-else-if="row.status === 1">已发布</span>
        <span v-else>已作废</span>
      </template>
    </avue-crud>
  </basic-container>
</template>

<script>
import * as api from "@/api/logs";

export default {
  name: "appList",
  components: {},
  data() {
    return {
      page: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
      },
      data: [],
      loading: false,
      option: {
        height: "auto",
        calcHeight: 30,
        dialogWidth: 900,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: true,
        index: true,
        selection: false,
        labelWidth: 120,
        menuWidth: 150,
        menu: false,
        viewBtn: false,
        dialogClickModal: false,
        tabs: true,
        delBtn: false,
        addBtn: false,
        editBtn: false,
        refreshBtn: false,
        columnBtn: false,
        column: [
          {
            label: "对象类型",
            prop: "modelType",
          },
          {
            label: "编码/编号",
            prop: "nameEn",
          },
          {
            label: "状态",
            prop: "status",
          },
          {
            label: "操作",
            prop: "descriptionCn",
          },
          {
            label: "操作描述",
            prop: "descriptionCn",
          },
          {
            label: "操作人",
            prop: "creator",
          },
          {
            label: "操作IP",
            prop: "creator",
          },
          {
            label: "操作时间",
            prop: "createTime",
          },
          {
            label: "是否成功",
            prop: "isAbstract",
          },
          {
            label: "数据创建者",
            prop: "creator",
          },
          {
            label: "数据创建时间",
            prop: "createTime",
          },
        ],
      },

      visible: false,
      tabsList: [],
    };
  },
  methods: {
    getPage() {
     /* api
        .getAuditLog({ page: this.page.currentPage, size: this.page.pageSize })
        .then((res) => {
          let { total, records } = res.data.data;
          this.page.total = total;
          this.data = records;
        });*/
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
      this.getPage();
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
      this.getPage();
    },
  },
  mounted() {
    this.getPage();
  },
};
</script>

<style scoped>
</style>
